package com.siki.www.clock.controller;


import com.siki.salessystemcommon.entity.enumeration.*;
import com.siki.salessystemcommon.utils.EnumUtil;
import com.siki.salessystemcommon.utils.SystemMsgJsonResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Getter;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @author keyvonchen
 */
@RestController
@Api(tags = "数据映射")
@RequestMapping("/api/vi/enum")
@CrossOrigin
public class enumController {
    @GetMapping("/cardType")
    @ApiOperation(value = "[枚举]-身份类别",httpMethod = "GET")
    public SystemMsgJsonResponse getCardType(){
        return SystemMsgJsonResponse.success(EnumUtil.getEnumTypeJsonArray(CardType.class));
    }

    @GetMapping("/identifyType")
    @ApiOperation(value = "[枚举]-人员类别",httpMethod = "GET")
    public SystemMsgJsonResponse getIdentifyType(){
        return SystemMsgJsonResponse.success(EnumUtil.getEnumTypeJsonArray(IdentifyType.class));
    }

    @GetMapping("/peopleType")
    @ApiOperation(value = "[枚举]-是否重点人员",httpMethod = "GET")
    public SystemMsgJsonResponse getPeopleType(){
        return SystemMsgJsonResponse.success(EnumUtil.getEnumTypeJsonArray(PeopleType.class));
    }

    @GetMapping("/physicalCondition")
    @ApiOperation(value = "[枚举]-身体状况",httpMethod = "GET")
    public SystemMsgJsonResponse getPhysicalCondition(){
        return SystemMsgJsonResponse.success(EnumUtil.getEnumTypeJsonArray(PhysicalCondition.class));
    }

    @GetMapping("/temperatureStatus")
    @ApiOperation(value = "[枚举]-温度类别",httpMethod = "GET")
    public SystemMsgJsonResponse getTemperatureStatus(){
        return SystemMsgJsonResponse.success(EnumUtil.getEnumTypeJsonArray(TemperatureStatus.class));
    }
}
